From: stekloff@dyn9047022152.beaverton.ibm.com Date: Thu, 4 May 2006 13:20:11 +0000 (+0100) Subject: First step to network infrastructure, add a type to XenDomain to identify X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16108^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=5b27032111166746826173d742c2e711918e41fc;p=xen.git First step to network infrastructure, add a type to XenDomain to identify it as HVM or PV rather than using the config time option. The forthcoming XenNetDevice will need to check. This is also the first step toward running PV and HVM domains at the same time. Signed-off-by: Daniel Stekloff --- diff --git a/tools/xm-test/lib/XmTestLib/XenDomain.py b/tools/xm-test/lib/XmTestLib/XenDomain.py index 1779d459ae..d13037f0fe 100644 --- a/tools/xm-test/lib/XmTestLib/XenDomain.py +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py @@ -193,6 +193,12 @@ class XenDomain: self.name = getUniqueName() self.config = config + # Set domain type, either PV for ParaVirt domU or HVM for + # FullVirt domain + if ENABLE_HVM_SUPPORT: + self.type = "HVM" + else: + self.type = "PV" def start(self): @@ -203,6 +209,10 @@ class XenDomain: extra=output, errorcode=ret) + # HVM domains require waiting for boot + if self.getDomainType() == "HVM": + waitForBoot() + def stop(self): prog = "xm" cmd = " shutdown " @@ -225,6 +235,9 @@ class XenDomain: def getId(self): return domid(self.getName()); + def getDomainType(self): + return self.type + class XmTestDomain(XenDomain): @@ -246,11 +259,6 @@ class XmTestDomain(XenDomain): XenDomain.__init__(self, config.getOpt("name"), config=config) - def start(self): - XenDomain.start(self) - if ENABLE_HVM_SUPPORT: - waitForBoot() - def minSafeMem(self): return 32